package com.fuyao.cloud.admin.controller;

import cn.hutool.core.lang.UUID;
import com.fuyao.cloud.common.core.util.R;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author ly
 * @date 2021/11/17 12:37
 */
@RestController
@AllArgsConstructor
@RequestMapping("/uuid")
@Api(value = "uuid", tags = "uuid生成控制器")
public class SysUUIDController {

	/**
	 * 获取uuid 字符串
	 *
	 * @return uuid 字符串
	 */
	@GetMapping("/getUUID")
	public synchronized R<String> getUUID() {
		return R.ok(UUID.randomUUID().toString(),null);
	}
}
